{% assign pagination = page.leaf %}
{% unless pagination.previous == nil and pagination.next == nil %}
<section>

<div class="row">
    {% unless pagination.previous == nil %}
    {% assign previous = site.tree[page.lang][pagination.previous.section][pagination.previous.chapter] %}
    {% if pagination.previous.section == 'home' %}
      {% assign title = site.data.locales[page.lang].sections.home %}
    {% else %}
      {% assign title = previous.title %}
    {% endif %}
    <div class="6u 12u$(small)">
        <a class="button special fit" href="{{ previous.url }}" title="{{ title }}">← {{ title }}</a>
    </div>
    {% endunless %}
    {% unless pagination.next == nil %}
    {% assign next = site.tree[page.lang][pagination.next.section][pagination.next.chapter] %}
    <div class="6u 12u$(small)">
        <a class="button special fit" href="{{ next.url }}" title="{{ next.title }}">{{ next.title }} →</a>
    </div>
    {% endunless %}
</div>
</section>

{% endunless %}
